Fix PatchOp::change API (#4616)

This commit is contained in:
Rushmore Mushambi 2024-08-27 13:24:22 +01:00 committed by GitHub
parent 4775bf6b08
commit 9ca3a4d087
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,5 @@
//! The different options and types for use in API functions
use dmp::Diff;
use serde::Serialize;
pub mod auth;
@ -126,10 +126,10 @@ impl PatchOp {
}
/// Changes a value
pub fn change(path: &str, diff: Diff) -> Self {
pub fn change(path: &str, diff: String) -> Self {
Self(Serializer::new().serialize(UnitOp::Change {
path,
value: diff.text,
value: diff,
}))
}
}