We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 81def41 commit a425b5fCopy full SHA for a425b5f
1 file changed
plugins/fs/src/watcher.rs
@@ -45,16 +45,18 @@ pub fn watch<R: Runtime>(
45
global_scope: GlobalScope<Entry>,
46
command_scope: CommandScope<Entry>,
47
) -> CommandResult<ResourceId> {
48
- let mut resolved_paths = Vec::with_capacity(paths.capacity());
49
- for path in paths {
50
- resolved_paths.push(resolve_path(
51
- &webview,
52
- &global_scope,
53
- &command_scope,
54
- path,
55
- options.base_dir,
56
- )?);
57
- }
+ let resolved_paths = paths
+ .into_iter()
+ .map(|path| {
+ resolve_path(
+ &webview,
+ &global_scope,
+ &command_scope,
+ path,
+ options.base_dir,
+ )
58
+ })
59
+ .collect::<CommandResult<Vec<_>>>()?;
60
61
let recursive_mode = if options.recursive {
62
RecursiveMode::Recursive
0 commit comments