Skip to content

Commit

Permalink
(fix) Migrate CI Rustc and MdBook versions to latest stable and fixed…
Browse files Browse the repository at this point in the history
… format error
  • Loading branch information
Walker-00 committed Mar 5, 2024
1 parent c12423d commit aff4dfc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
toolchain: [stable, 1.64.0]
toolchain: [stable, 1.76.0]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.4'
mdbook-version: '0.4.37'
- name: Setup toolchain
uses: dtolnay/rust-toolchain@master
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.4'
mdbook-version: '0.4.37'

- run: cd docs && mdbook build

Expand Down
17 changes: 10 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,12 @@ fn show_paths(config: &Config) {
|e| format!("[Error: {e}]"),
|(mut path, source)| {
path.push(""); // Trailing path separator
path.to_str().map_or_else(|| {
"[Invalid]".to_string()
}, |path| format!("{path} ({source})"))
});
path.to_str().map_or_else(
|| "[Invalid]".to_string(),
|path| format!("{path} ({source})"),
)
},
);
let config_path = get_config_path().map_or_else(
|e| format!("[Error: {e}]"),
|(path, _)| path.display().to_string(),
Expand All @@ -167,9 +169,10 @@ fn show_paths(config: &Config) {
path.push(""); // Trailing path separator
path.display().to_string()
};
let custom_pages_dir = config.directories.custom_pages_dir.as_ref().map_or_else(||{
"[None]".to_string()
}, |ref path_with_source| path_with_source.to_string());
let custom_pages_dir = config.directories.custom_pages_dir.as_ref().map_or_else(
|| "[None]".to_string(),
|ref path_with_source| path_with_source.to_string(),
);

println!("Config dir: {config_dir}");
println!("Config path: {config_path}");
Expand Down

0 comments on commit aff4dfc

Please sign in to comment.