mirror of
https://github.com/nushell/nushell
synced 2025-01-13 21:55:07 +00:00
stdlib: make helper modules available in std (#8841)
> **Note** > waiting for the following to land > - https://github.com/nushell/nushell/pull/8824 to avoid conflicts, i'll add this to `CONTRIBUTING.md` once it's ready 👍 should close #8839 # Description this PR moves the `log` submodule of `std` to the top of the call stack, making it available in the rest of the library as `log`. i've added some comments around the `submodules` list in `load_standard_library` to make it clear how it should work. # User-Facing Changes `log` and `assert` are now available in the rest of `std`. # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - ⚫ `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting ``` $nothing ```
This commit is contained in:
parent
de76c7a57d
commit
6d51e34d0a
1 changed files with 6 additions and 1 deletions
|
@ -66,11 +66,16 @@ pub fn load_standard_library(
|
|||
let name = "std".to_string();
|
||||
let content = include_str!("../lib/mod.nu");
|
||||
|
||||
// these modules are loaded in the order they appear in this list
|
||||
#[rustfmt::skip]
|
||||
let submodules = vec![
|
||||
// helper modules that could be used in other parts of the library
|
||||
("log", include_str!("../lib/log.nu")),
|
||||
("assert", include_str!("../lib/assert.nu")),
|
||||
|
||||
// the rest of the library
|
||||
("dirs", include_str!("../lib/dirs.nu")),
|
||||
("help", include_str!("../lib/help.nu")),
|
||||
("log", include_str!("../lib/log.nu")),
|
||||
("xml", include_str!("../lib/xml.nu")),
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in a new issue