fix: remove cargo check warnings
This commit is contained in:
@@ -24,7 +24,6 @@ pub const MAX_TOTAL_BYTES: usize = 4 * 1024 * 1024;
|
|||||||
pub const MAX_PATH_BYTES: usize = 512;
|
pub const MAX_PATH_BYTES: usize = 512;
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize, ts_rs::TS)]
|
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize, ts_rs::TS)]
|
||||||
#[serde(transparent)]
|
|
||||||
pub struct VirtualPath(String);
|
pub struct VirtualPath(String);
|
||||||
|
|
||||||
impl VirtualPath {
|
impl VirtualPath {
|
||||||
@@ -1791,6 +1790,19 @@ mod tests {
|
|||||||
assert_eq!(path("profiles/main.dcdl").as_str(), "profiles/main.dcdl");
|
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]
|
#[test]
|
||||||
fn candidate_changes_are_atomic_ordered_and_conflict_checked() {
|
fn candidate_changes_are_atomic_ordered_and_conflict_checked() {
|
||||||
let base = ConfigTreeSnapshot::from_entries(
|
let base = ConfigTreeSnapshot::from_entries(
|
||||||
|
|||||||
@@ -7960,11 +7960,6 @@ struct PasskeyLoginCompleteRequest {
|
|||||||
credential: PublicKeyCredential,
|
credential: PublicKeyCredential,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
|
||||||
struct PasskeyLoginCompleteResponse {
|
|
||||||
user: AuthenticatedUser,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
#[serde(deny_unknown_fields)]
|
#[serde(deny_unknown_fields)]
|
||||||
struct DeviceLoginStartRequest {
|
struct DeviceLoginStartRequest {
|
||||||
|
|||||||
Reference in New Issue
Block a user