summaryrefslogtreecommitdiff
path: root/crates/typst-cli/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/typst-cli/src')
-rw-r--r--crates/typst-cli/src/download.rs4
-rw-r--r--crates/typst-cli/src/update.rs6
2 files changed, 4 insertions, 6 deletions
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",
),
};