diff options
Diffstat (limited to 'crates/typst-cli')
| -rw-r--r-- | crates/typst-cli/Cargo.toml | 3 | ||||
| -rw-r--r-- | crates/typst-cli/src/download.rs | 4 | ||||
| -rw-r--r-- | crates/typst-cli/src/update.rs | 6 |
3 files changed, 7 insertions, 6 deletions
diff --git a/crates/typst-cli/Cargo.toml b/crates/typst-cli/Cargo.toml index 3819469e..1854e856 100644 --- a/crates/typst-cli/Cargo.toml +++ b/crates/typst-cli/Cargo.toml @@ -74,3 +74,6 @@ embed-fonts = [] # Permits the CLI to update itself without a package manager self-update = ["dep:self-replace", "dep:xz2", "dep:zip", "ureq/json"] + +[lints] +workspace = true diff --git a/crates/typst-cli/src/download.rs b/crates/typst-cli/src/download.rs index e5a97cda..0fff7b85 100644 --- a/crates/typst-cli/src/download.rs +++ b/crates/typst-cli/src/download.rs @@ -198,7 +198,7 @@ impl RemoteReader { })) ) } - None => format!("Total: {} Speed: {} Elapsed: {}", total, speed_h, elapsed,), + None => format!("Total: {total} Speed: {speed_h} Elapsed: {elapsed}"), }; let _ = write!(self.stderr, "{output}"); @@ -252,6 +252,6 @@ fn as_time_unit(size: usize, include_suffix: bool) -> String { } else if size >= KI { format!("{:5.1} KiB{}", size / KI, suffix) } else { - format!("{size:3.0} B{}", suffix) + format!("{size:3.0} B{suffix}") } } diff --git a/crates/typst-cli/src/update.rs b/crates/typst-cli/src/update.rs index cde77dbb..cfb93454 100644 --- a/crates/typst-cli/src/update.rs +++ b/crates/typst-cli/src/update.rs @@ -102,12 +102,10 @@ impl Release { pub fn from_tag(tag: Option<&Version>) -> StrResult<Release> { let url = match tag { Some(tag) => format!( - "https://api.github.com/repos/{}/{}/releases/tags/v{}", - TYPST_GITHUB_ORG, TYPST_REPO, tag + "https://api.github.com/repos/{TYPST_GITHUB_ORG}/{TYPST_REPO}/releases/tags/v{tag}" ), None => format!( - "https://api.github.com/repos/{}/{}/releases/latest", - TYPST_GITHUB_ORG, TYPST_REPO + "https://api.github.com/repos/{TYPST_GITHUB_ORG}/{TYPST_REPO}/releases/latest", ), }; |
