mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 00:07:46 +02:00
Remove nu-glob
's dependency on nu-protocol
(#15349)
# Description This PR solves a circular dependency issue (`nu-test-support` needs `nu-glob` which needs `nu-protocol` which needs `nu-test-support`). This was done by making the glob functions that any type that implements `Interruptible` to remove the dependency on `Signals`. # After Submitting Make `Paths.next()` a O(1) operation so that cancellation/interrupt handling can be moved to the caller (e.g., by wrapping the `Paths` iterator in a cancellation iterator).
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
use super::Director;
|
||||
use crate::fs::{self, Stub};
|
||||
use nu_glob::glob;
|
||||
use nu_glob::{glob, Uninterruptible};
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
use nu_path::Path;
|
||||
use nu_path::{AbsolutePath, AbsolutePathBuf};
|
||||
@ -231,7 +231,7 @@ impl Playground<'_> {
|
||||
}
|
||||
|
||||
pub fn glob_vec(pattern: &str) -> Vec<std::path::PathBuf> {
|
||||
let glob = glob(pattern, None);
|
||||
let glob = glob(pattern, Uninterruptible);
|
||||
|
||||
glob.expect("invalid pattern")
|
||||
.map(|path| {
|
||||
|
Reference in New Issue
Block a user