Skip to content

Commit 48a2fdf

Browse files
committed
fixup! controllers::version::metadata: Use json! macro to simplify JSON serialization code
1 parent 88dc5a7 commit 48a2fdf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/controllers/version/metadata.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use crate::controllers::frontend_prelude::*;
88

99
use crate::models::VersionOwnerAction;
10-
use crate::views::{EncodableDependency, EncodablePublicUser, EncodableVersion};
10+
use crate::views::{EncodableDependency, EncodableVersion};
1111

1212
use super::{extract_crate_name_and_semver, version_and_crate};
1313

@@ -37,8 +37,8 @@ pub fn authors(req: &mut dyn RequestExt) -> EndpointResult {
3737
// Because the API is not used anymore after RFC https://github.com/rust-lang/rfcs/pull/3052.
3838

3939
Ok(req.json(&json!({
40-
"users": vec![],
41-
"meta": { "names": vec![] },
40+
"users": [],
41+
"meta": { "names": [] },
4242
})))
4343
}
4444

0 commit comments

Comments
 (0)