fix: remove cargo check warnings

This commit is contained in:
2026-08-20 15:16:29 +09:00
parent f5f80fcd48
commit 614157424f
2 changed files with 13 additions and 6 deletions
+13 -1
View File
@@ -24,7 +24,6 @@ pub const MAX_TOTAL_BYTES: usize = 4 * 1024 * 1024;
pub const MAX_PATH_BYTES: usize = 512;
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize, ts_rs::TS)]
#[serde(transparent)]
pub struct VirtualPath(String);
impl VirtualPath {
@@ -1791,6 +1790,19 @@ mod tests {
assert_eq!(path("profiles/main.dcdl").as_str(), "profiles/main.dcdl");
}
#[test]
fn virtual_path_serde_shape_is_a_string() {
let path = path("profiles/main.dcdl");
assert_eq!(
serde_json::to_value(&path).unwrap(),
serde_json::json!(path.as_str())
);
assert_eq!(
serde_json::from_value::<VirtualPath>(serde_json::json!(path.as_str())).unwrap(),
path
);
}
#[test]
fn candidate_changes_are_atomic_ordered_and_conflict_checked() {
let base = ConfigTreeSnapshot::from_entries(
-5
View File
@@ -7960,11 +7960,6 @@ struct PasskeyLoginCompleteRequest {
credential: PublicKeyCredential,
}
#[derive(Debug, Serialize, Deserialize)]
struct PasskeyLoginCompleteResponse {
user: AuthenticatedUser,
}
#[derive(Debug, Deserialize)]
#[serde(deny_unknown_fields)]
struct DeviceLoginStartRequest {