Skip to content

Commit 0d036f2

Browse files
committed
Use Unknown for default location
1 parent f62c2a8 commit 0d036f2

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/api/server_info.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,17 @@ macro_rules! CargoServerInfo_1bc8c806_8cb9_4aaf_b57a_8f94c4d1b59d {
3535
server_name: env!("CARGO_PKG_NAME").to_owned(),
3636
manufacturer: env!("CARGO_PKG_AUTHORS").to_owned(),
3737
manufacturer_version: env!("CARGO_PKG_VERSION").to_owned(),
38-
location: env!("CARGO_PKG_HOMEPAGE").to_owned(),
38+
location: {
39+
// Technically this field should be a physical location,
40+
// but repository homepage seems better than nothing.
41+
let homepage = env!("CARGO_PKG_HOMEPAGE");
42+
if homepage.is_empty() {
43+
"Unknown"
44+
} else {
45+
homepage
46+
}
47+
}
48+
.to_owned(),
3949
}
4050
};
4151
}

0 commit comments

Comments
 (0)