Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmittag committed Jan 30, 2024
1 parent 4d1a72a commit 7b282f8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions kuksa_databroker/databroker/src/broker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ use std::sync::atomic::{AtomicI32, Ordering};
use std::sync::Arc;
use std::time::SystemTime;

use tracing::{debug, info, warn};
use crate::glob;
use tracing::{debug, info, warn};

#[derive(Debug)]
pub enum UpdateError {
Expand Down Expand Up @@ -1846,7 +1846,7 @@ mod tests {
EntryUpdate {
path: None,
datapoint: None,
actuator_target: Some(Some(Datapoint {
actuator_target: Some(Some(Datapoint {
ts: time1,
value: DataValue::Bool(true),
})),
Expand Down
12 changes: 9 additions & 3 deletions kuksa_databroker/databroker/src/grpc/kuksa_val_v1/val.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,15 +293,19 @@ impl proto::val_server::Val for broker::DataBroker {
error: Some(proto::Error {
code: 400,
reason: String::from("type mismatch"),
message: String::from("cannot set existing datapoint to value of different type"),
message: String::from(
"cannot set existing datapoint to value of different type",
),
}),
},
broker::UpdateError::UnsupportedType => DataEntryError {
path,
error: Some(proto::Error {
code: 400,
reason: String::from("unsupported type"),
message: String::from("cannot set datapoint to value of unsupported type"),
message: String::from(
"cannot set datapoint to value of unsupported type",
),
}),
},
broker::UpdateError::OutOfBounds => DataEntryError {
Expand Down Expand Up @@ -333,7 +337,9 @@ impl proto::val_server::Val for broker::DataBroker {
error: Some(proto::Error {
code: 400,
reason: String::from("timestamp too old"),
message: String::from("given timestamp is older than the saved timestamp"),
message: String::from(
"given timestamp is older than the saved timestamp",
),
}),
},
};
Expand Down

0 comments on commit 7b282f8

Please sign in to comment.