Run rustfmt

This commit is contained in:
Paul van Tilburg 2018-12-18 15:48:45 +01:00
parent 3017d53256
commit 6d25920dfb
2 changed files with 6 additions and 5 deletions

View File

@ -1,7 +1,7 @@
use rocket::State;
use rocket_contrib::Json;
use super::super::NoteStore;
use super::super::models::note::Note;
use super::super::NoteStore;
use rocket::State;
use rocket_contrib::json::Json;
#[get("/", format = "application/json")]
pub fn index(notes: State<NoteStore>) -> Option<Json<Vec<Note>>> {
@ -37,11 +37,11 @@ pub fn update(
#[cfg(test)]
mod tests {
use super::*;
use rocket;
use rocket::http::{Accept, ContentType, Status};
use rocket::local::Client;
use serde_json;
use super::*;
#[test]
fn index() {

View File

@ -67,7 +67,8 @@ impl Note {
File::open(&entry).expect(&format!("Cannot open note file: {}", file_name));
file.read_to_string(&mut data)
.expect(&format!("Cannot read note file: {}", file_name));
let metadata = file.metadata()
let metadata = file
.metadata()
.expect(&format!("Cannot get metadata of note file: {}", file_name));
let mut note = Note {