Run rustfmt
This commit is contained in:
parent
3017d53256
commit
6d25920dfb
|
@ -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() {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue