Fix crate_version_source.rs

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
Jiahao XU 2025-06-06 00:48:25 +10:00 committed by GitHub
parent 8f13d324c4
commit 01d5dbf234
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,4 +1,4 @@
use std::{borrow::Cow, fmt::{Self, Write as _}, str::FromStr};
use std::{borrow::Cow, fmt::{self, Write as _}, str::FromStr};
use binstalk_types::maybe_owned::MaybeOwned;
use compact_str::CompactString;
@ -131,7 +131,7 @@ impl fmt::Display for Source<'_> {
Source::Sparse(url) => {
let url = url.as_str();
write!(f, "sparse+{url}")?;
if (url.ends_with("/")) {
if url.ends_with("/") {
Ok(())
} else {
f.write_char('/')