Skip to content

Commit

Permalink
Merge pull request #24 from eloyrobillard/weirdly-no-error
Browse files Browse the repository at this point in the history
Upgrade diesel to latest version
  • Loading branch information
jhodapp authored Sep 27, 2023
2 parents 428695e + 0288b7e commit 4e50744
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
rocket = { version = "0.5.0-rc.2", features = ["json"] }
serde = "1.0.147"
diesel = { version = "1.4.8", features = ["postgres"] }
diesel = { version = "2.1.1", features = ["postgres"] }
env_logger = "0.10.0"
log = "0.4.17"

Expand Down
2 changes: 1 addition & 1 deletion src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub(crate) async fn events(
yield Event::data(format!("{}°C", reading.temperature)).event("temperature");
yield Event::data(format!("{}%", reading.humidity)).event("humidity");
yield Event::data(format!("{} mbars", reading.pressure)).event("pressure");
yield Event::data(format!("{}", reading.air_purity)).event("air_purity");
yield Event::data(reading.air_purity.to_string()).event("air_purity");
yield Event::data(format!("{} pcs/ltr", reading.dust_concentration)).event("dust_concentration");
}
Err(e) => { error!("Err: failed to retrieve latest reading: {:?}", e) }
Expand Down
2 changes: 1 addition & 1 deletion src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub struct Reading {

#[derive(Debug, Insertable, Deserialize)]
#[serde(crate = "rocket::serde")]
#[table_name = "readings"]
#[diesel(table_name = readings)]
pub struct NewReading {
pub temperature: f64,
pub humidity: f64,
Expand Down

0 comments on commit 4e50744

Please sign in to comment.