Skip to content

Commit d632c3f

Browse files
authored
deps: cargo update and some libs (#381)
* deps: cargo update * deps: update some libs * fix clippys
1 parent 776d87a commit d632c3f

File tree

12 files changed

+141
-125
lines changed

12 files changed

+141
-125
lines changed

Cargo.lock

Lines changed: 71 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ smallmap = "1.4"
2323
derivative = "2.2"
2424
derive_more = "0.99"
2525
rand = "0.8"
26-
mockall = "0.12"
27-
prost = "0.12"
26+
mockall = "0.13"
27+
prost = "0.13"
2828
indexmap = "2.2"

packages/media_gateway/src/store.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl GatewayStore {
3030
pub fn new(zone: u32, location: Location, max_cpu: u8, max_memory: u8, max_disk: u8) -> Self {
3131
Self {
3232
node: NodeMetrics::default(),
33-
webrtc: ServiceStore::new(ServiceKind::Webrtc, location.clone()),
33+
webrtc: ServiceStore::new(ServiceKind::Webrtc, location),
3434
zone,
3535
location,
3636
output: None,
@@ -53,7 +53,7 @@ impl GatewayStore {
5353
disk: self.node.disk,
5454
origin: Origin::Gateway(GatewayOrigin {
5555
zone: self.zone,
56-
location: Some(self.location.clone()),
56+
location: Some(self.location),
5757
}),
5858
webrtc: self.webrtc.local_stats(),
5959
};
@@ -89,7 +89,7 @@ impl GatewayStore {
8989

9090
pub fn best_for(&self, kind: ServiceKind, location: Option<Location>) -> Option<u32> {
9191
let node = match kind {
92-
ServiceKind::Webrtc => self.webrtc.best_for(location.clone()),
92+
ServiceKind::Webrtc => self.webrtc.best_for(location),
9393
};
9494
log::debug!("[GatewayStore] query best {:?} for {:?} got {:?}", kind, location, node);
9595
node

packages/media_gateway/src/store/service.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl ServiceStore {
137137
}
138138

139139
pub fn best_for(&self, location: Option<Location>) -> Option<u32> {
140-
let location = location.unwrap_or_else(|| self.location.clone());
140+
let location = location.unwrap_or(self.location);
141141
let mut min_dis = distance(&self.location, &location);
142142
let mut min_node = self.local_sources.first().map(|s| s.node);
143143

0 commit comments

Comments
 (0)