Skip to content

Commit 0357732

Browse files
committed
Fix warnings
1 parent ef1fe24 commit 0357732

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/bundle/modules.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ impl Manager {
127127
pub fn start_watcher(&mut self, watcher_path: &Path) -> bool {
128128
let watcher_name = if let Some(watcher) = self.get_watcher_by_path(watcher_path) {
129129
if watcher.start() {
130-
watcher.name().to_string()
130+
watcher.name().clone()
131131
} else {
132132
return false;
133133
}
@@ -145,7 +145,7 @@ impl Manager {
145145
pub fn stop_watcher(&mut self, watcher_path: &Path) {
146146
let watcher_name = if let Some(watcher) = self.get_watcher_by_path(watcher_path) {
147147
watcher.stop();
148-
Some(watcher.name().to_string())
148+
Some(watcher.name().clone())
149149
} else {
150150
None
151151
};

watchers/src/watchers.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ async fn create_watcher<T: Watcher>(client: &Arc<ReportClient>, name: &str) -> O
6969
macro_rules! watch {
7070
($watcher:expr) => {
7171
if let Some(watcher) = $watcher.await {
72-
return Some(Box::new(watcher));
72+
let watcher: Box<dyn Watcher> = Box::new(watcher);
73+
return Some(watcher);
7374
}
7475
};
7576
}

0 commit comments

Comments
 (0)