From 2823504e84ca47a17b9c4bbd9dc3ab2687dc41f2 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Sat, 28 Nov 2020 04:43:36 +0700 Subject: [PATCH] Call cargo fmt --- src/database/file.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/database/file.rs b/src/database/file.rs index ccc0038..4856c98 100644 --- a/src/database/file.rs +++ b/src/database/file.rs @@ -12,13 +12,13 @@ custom_error! { pub IncorrectPointer{pointer: String} = "Incorrect pointer is sp /// This is a enum that used internally to refer to values inside of /// JSON (their serde implementation) objects and arrays. /// This enum helps to simplify module's code. -/// +/// /// For values inside of JSON object it stores object's /// `Map` and name of referred value. -/// +/// /// For values inside JSON arrays it stores array's /// `Vec` and referred index. -/// +/// /// `Invalid` can be used to return a failed state. enum ValueReference<'a> { Object(&'a mut serde_json::Map, String), @@ -74,13 +74,13 @@ impl File { /// Inserts new JSON value inside this file /// (possibly in some sub-object/array). - /// + /// /// Given pointer must point at new value: /// 1. If it already exists, - it will be overwritten. /// 2. If it does not exist, but it's parent object/array does - /// it will be added. /// 3. Otherwise an error will be raise. - /// + /// /// If array needs to be expanded, - missing values will be filled /// with `json!(null)`, i.e. inserting `7` at index `5` in array `[1, 2, 3]` /// will produce `[1, 2, 3, null, null, 7]`. @@ -120,7 +120,7 @@ impl File { /// Helper method to create a value if missing (as `json!(null)`). /// Can only be done if parent container already exists. - /// + /// /// For specifics refer to `insert()` method. fn touch(&mut self, pointer: &str) -> (Result<(), IncorrectPointer>) { // If value is present - we're done