diff --git a/Cargo.lock b/Cargo.lock index ce9e81f..6874a96 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1082,12 +1082,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - [[package]] name = "home" version = "0.5.9" @@ -1272,17 +1266,6 @@ dependencies = [ "syn", ] -[[package]] -name = "is-terminal" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "is_ci" version = "1.2.0" @@ -1357,13 +1340,14 @@ dependencies = [ [[package]] name = "kdl" -version = "4.6.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "062c875482ccb676fd40c804a40e3824d4464c18c364547456d1c8e8e951ae47" +checksum = "a927c788db5413fbaced8fc5ac08a4a341c50766cba1d363ba3e25f3db343af0" dependencies = [ "miette", - "nom", + "num", "thiserror 1.0.60", + "winnow", ] [[package]] @@ -1447,15 +1431,14 @@ dependencies = [ [[package]] name = "miette" -version = "5.10.0" +version = "7.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59bb584eaeeab6bd0226ccf3509a69d7936d148cf3d036ad350abe35e8c6856e" +checksum = "317f146e2eb7021892722af37cf1b971f0a70c8406f487e24952667616192c64" dependencies = [ "backtrace", "backtrace-ext", - "is-terminal", + "cfg-if", "miette-derive", - "once_cell", "owo-colors", "supports-color", "supports-hyperlinks", @@ -1468,21 +1451,15 @@ dependencies = [ [[package]] name = "miette-derive" -version = "5.10.0" +version = "7.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" +checksum = "23c9b935fbe1d6cbd1dac857b54a688145e2d93f48db36010514d0f612d0ad67" dependencies = [ "proc-macro2", "quote", "syn", ] -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "miniz_oxide" version = "0.7.2" @@ -1513,16 +1490,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - [[package]] name = "nucleo" version = "0.5.0" @@ -1544,6 +1511,79 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "num" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + [[package]] name = "object" version = "0.32.2" @@ -1567,9 +1607,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "owo-colors" -version = "3.5.0" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" +checksum = "fb37767f6569cd834a413442455e0f066d0d522de8630436e2a1761d9726ba56" [[package]] name = "parking_lot" @@ -1591,7 +1631,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -1840,12 +1880,6 @@ version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" -[[package]] -name = "smawk" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" - [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -1888,31 +1922,24 @@ dependencies = [ [[package]] name = "supports-color" -version = "2.1.0" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6398cde53adc3c4557306a96ce67b302968513830a77a95b2b17305d9719a89" +checksum = "c64fc7232dd8d2e4ac5ce4ef302b1d81e0b80d055b9d77c7c4f51f6aa4c867d6" dependencies = [ - "is-terminal", "is_ci", ] [[package]] name = "supports-hyperlinks" -version = "2.1.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84231692eb0d4d41e4cdd0cabfdd2e6cd9e255e65f80c9aa7c98dd502b4233d" -dependencies = [ - "is-terminal", -] +checksum = "804f44ed3c63152de6a9f90acbea1a110441de43006ea51bcce8f436196a288b" [[package]] name = "supports-unicode" -version = "2.1.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f850c19edd184a205e883199a261ed44471c81e39bd95b1357f5febbef00e77a" -dependencies = [ - "is-terminal", -] +checksum = "b7401a30af6cb5818bb64852270bb722533397edcfc7344954a38f420819ece2" [[package]] name = "syn" @@ -1950,21 +1977,20 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.1.17" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" +checksum = "5352447f921fda68cf61b4101566c0bdb5104eff6804d0678e5227580ab6a4e9" dependencies = [ - "libc", - "winapi", + "rustix", + "windows-sys 0.59.0", ] [[package]] name = "textwrap" -version = "0.15.2" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b3e525a49ec206798b40326a44121291b530c963cfb01018f63e135bac543d" +checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" dependencies = [ - "smawk", "unicode-linebreak", "unicode-width 0.1.12", ] @@ -2224,7 +2250,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -2244,18 +2279,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -2266,9 +2301,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -2278,9 +2313,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -2290,15 +2325,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -2308,9 +2343,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -2320,9 +2355,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -2332,9 +2367,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -2344,9 +2379,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" diff --git a/Cargo.toml b/Cargo.toml index 1527452..3426a01 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,8 +29,8 @@ gix = { version = "0.69.1", default-features = false, features = [ "max-performa indexmap = "2.7.0" itertools = "0.13.0" jwalk = "0.8.1" -kdl = "4.6.0" -miette = { version = "5.10.0", features = ["fancy"] } +kdl = "6.1.0" +miette = { version = "7.4.0", features = ["fancy"] } nucleo = "0.5.0" ratatui = "0.29.0" rayon = "1.10.0" diff --git a/config.kdl b/config.kdl index 27bd7ef..42c2fb2 100644 --- a/config.kdl +++ b/config.kdl @@ -1,17 +1,17 @@ // Configure the list of search paths used to search for valid workspaces. // Tux uses these valid workspaces as options to attach to. -// paths { +/-paths { // Workspace paths are paths to recursivly search to find valid workspaces. // Tux will recursivly search the workspace paths until the max depth is // reached. To override the default workspace value set optional - // `default=false`. + // `default=#false`. // // Default: // - "~" // - // workspace default=true { - // - "~/code" - // } + /-workspace default=#true { + - "~/code" + } // Single paths are paths that are added to the list of valid workspace // paths. This is useful if you want to add a path that would not be defined @@ -19,34 +19,34 @@ // // Default: (empty) // - // single default=false { - // - "~/.config/nvim" - // } -// } + /-single default=#false { + - "~/.config/nvim" + } +} // Search depth for workspace paths. // Default: 5 // -// depth 3 +/-depth 3 // Select the repositories remote default branch if multiple worktrees are found. If the default // worktree cannot be found the fallback will be to select the correct one. // -// Default: false +// Default: #false // -// default_worktree true +/-default_worktree #true // Workspace directory crawler will prune the paths containing any of these components. // Options: -// - default: boolean = true # Append to default value if true. +// - default: boolean = #true # Append to default value if true. // // Default: -// exclude_path default=true { +// exclude_path default=#true { // - ".direnv" // - "node_modules" // } // -// exclude_path { -// - ".direnv" -// - "node_modules" -// } +/-exclude_path { + - ".direnv" + - "node_modules" +} diff --git a/doc/configuration.adoc b/doc/configuration.adoc index 7b7fa60..2c154c9 100644 --- a/doc/configuration.adoc +++ b/doc/configuration.adoc @@ -59,7 +59,7 @@ Default: `false` [source,javascript] ---- -default_worktree true +default_worktree #true ---- === exclude_paths @@ -76,7 +76,7 @@ Default: `{ - ".direnv" "node_modules" }` [source,javascript] ---- -exclude_paths default=false { +exclude_paths default=#false { - ".direnv" - "node_modules" } @@ -90,7 +90,7 @@ attach to. ==== paths.workspace Workspace paths are paths to recursivly search to find valid workspaces. Tux will recursivly search the workspace paths -until the max depth is reached. To override the default workspace value set optional `default=false` +until the max depth is reached. To override the default workspace value set optional `default=#false` Optional arguments: @@ -103,7 +103,7 @@ Default: `{ - "~" }` [source, javascript] ---- paths { - workspaces default=false { + workspaces default=#false { - "~/code" } } @@ -125,7 +125,7 @@ Default: `{}` [source, javascript] ---- paths { - single default=false { + single default=#false { - "~/.config/nvim" } } diff --git a/readme.adoc b/readme.adoc index 5feafee..3a0d982 100644 --- a/readme.adoc +++ b/readme.adoc @@ -263,7 +263,7 @@ Default: `false` [source,javascript] ---- -default_worktree true +default_worktree #true ---- === exclude_paths @@ -280,7 +280,7 @@ Default: `{ - ".direnv" "node_modules" }` [source,javascript] ---- -exclude_paths default=false { +exclude_paths default=#false { - ".direnv" - "node_modules" } @@ -294,7 +294,7 @@ attach to. ==== paths.workspace Workspace paths are paths to recursivly search to find valid workspaces. Tux will recursivly search the workspace paths -until the max depth is reached. To override the default workspace value set optional `default=false` +until the max depth is reached. To override the default workspace value set optional `default=#false` Optional arguments: @@ -307,7 +307,7 @@ Default: `{ - "~" }` [source, javascript] ---- paths { - workspaces default=false { + workspaces default=#false { - "~/code" } } @@ -329,7 +329,7 @@ Default: `{}` [source, javascript] ---- paths { - single default=false { + single default=#false { - "~/.config/nvim" } } diff --git a/src/config/mod.rs b/src/config/mod.rs index d91332d..2ad2b0c 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -67,13 +67,13 @@ impl Config { let config_path = util::get_config(&["config.kdl"]); if config_path.exists() { config = Parser::new(Source::load(config_path.display().to_string())?) - .parse_with_default(Some(config))?; + .parse_with_config(Some(config))?; } let local_path = util::get_local(&["config.kdl"]); if local_path.exists() { config = Parser::new(Source::load(local_path.display().to_string())?) - .parse_with_default(Some(config))?; + .parse_with_config(Some(config))?; } Ok(config) diff --git a/src/config/parser.rs b/src/config/parser.rs index 974e495..1e8ae3f 100644 --- a/src/config/parser.rs +++ b/src/config/parser.rs @@ -10,15 +10,15 @@ pub struct Parser { fn type_from_value(value: &KdlValue) -> &'static str { match value { - KdlValue::RawString(_) | KdlValue::String(_) => "string", - KdlValue::Null => "null", + KdlValue::String(_) => "string", + KdlValue::Integer(_) => "integer", + KdlValue::Float(_) => "float", KdlValue::Bool(_) => "boolean", - KdlValue::Base10Float(_) => "float", - _ => "number", + KdlValue::Null => "null", } } -fn get_dash_values<'a>(doc: &'a KdlDocument, name: &'static str) -> Vec<&'a KdlEntry> { +fn get_dash_values<'a>(doc: &'a KdlDocument, name: &'static str) -> Vec<&'a KdlValue> { doc.get(name) .and_then(|n| n.children()) .map(|doc| doc.nodes()) @@ -35,11 +35,11 @@ impl Parser { } pub fn parse(self) -> Result { - self.parse_with_default(None) + self.parse_with_config(None) } - pub fn parse_with_default(self, default: Option) -> Result { - self.inner_parse(default.unwrap_or_default()) + pub fn parse_with_config(self, config: Option) -> Result { + self.inner_parse(config.unwrap_or_default()) } fn inner_parse(self, mut config: Config) -> Result { @@ -94,7 +94,7 @@ impl Parser { return Err(ParseError::UnknownConfigurationOption( option.to_owned(), self.src.clone(), - *node.name().span(), + node.name().span(), )); } } @@ -107,7 +107,7 @@ impl Parser { node.entries() .iter() .next() - .ok_or(ParseError::MissingValue(self.src.clone(), *node.span())) + .ok_or(ParseError::MissingValue(self.src.clone(), node.span())) } // fn first_entry_as_string<'a>(&'a self, node: &'a KdlNode) -> Result<&'a str, ParseError> { @@ -123,12 +123,16 @@ impl Parser { fn first_entry_as_i64<'a>(&'a self, node: &'a KdlNode) -> Result { self.first_entry(node).and_then(|entry| { - entry.value().as_i64().ok_or(ParseError::TypeMismatch( - "number", - type_from_value(entry.value()), - self.src.clone(), - *entry.span(), - )) + entry + .value() + .as_integer() + .map(|n| n as i64) + .ok_or(ParseError::TypeMismatch( + "integer", + type_from_value(entry.value()), + self.src.clone(), + entry.span(), + )) }) } @@ -138,18 +142,18 @@ impl Parser { "bool", type_from_value(entry.value()), self.src.clone(), - *entry.span(), + entry.span(), )) }) } fn get_default_optional(&self, node: &KdlNode) -> Result { match node.get("default") { - Some(value) => value.value().as_bool().ok_or(ParseError::TypeMismatch( + Some(value) => value.as_bool().ok_or(ParseError::TypeMismatch( "boolean", - type_from_value(value.value()), + type_from_value(value), self.src.clone(), - *value.span(), + node.span(), )), None => Ok(true), } @@ -162,15 +166,14 @@ impl Parser { ) -> Result, ParseError> { get_dash_values(doc, name) .into_iter() - .map(|entry| { - entry - .value() + .map(|value| { + value .as_string() .ok_or(ParseError::TypeMismatch( "string", - type_from_value(entry.value()), + type_from_value(value), self.src.clone(), - *entry.span(), + doc.span(), )) .map(|s| s.to_string()) }) @@ -184,15 +187,14 @@ impl Parser { ) -> Result, ParseError> { get_dash_values(doc, name) .into_iter() - .map(|entry| { - entry - .value() + .map(|value| { + value .as_string() .ok_or(ParseError::TypeMismatch( "string", - type_from_value(entry.value()), + type_from_value(value), self.src.clone(), - *entry.span(), + doc.span(), )) .map(|s| shellexpand::tilde(s).to_string()) }) diff --git a/src/config/source.rs b/src/config/source.rs index f941189..03e813d 100644 --- a/src/config/source.rs +++ b/src/config/source.rs @@ -47,7 +47,7 @@ impl SourceCode for Source { } } -impl From<&Source> for NamedSource { +impl From<&Source> for NamedSource { fn from(source: &Source) -> Self { let name = source.path.clone(); let input = source.raw.clone();