diff --git a/src/commands/in.rs b/src/commands/in.rs index b85a04d..28ecbc1 100644 --- a/src/commands/in.rs +++ b/src/commands/in.rs @@ -59,7 +59,7 @@ impl<'a> Command<'a> for InCommand { let (start, needs_warning) = time_or_warning(start, db)?; - db.entry_insert(start, None, note.map(|n| n), &sheet)?; + db.entry_insert(start, None, note, &sheet)?; writeln!(out, "Checked into sheet \"{}\".", sheet)?; diff --git a/src/editor.rs b/src/editor.rs index 550fd77..19ed56d 100644 --- a/src/editor.rs +++ b/src/editor.rs @@ -37,7 +37,7 @@ pub fn get_string(note_editor: Option<&str>, prev_contents: Option) -> R let mut tmpfile = NamedTempFile::new().map_err(|e| NoTmpFile(e.to_string()))?; if let Some(contents) = prev_contents { - tmpfile.write(contents.as_bytes())?; + tmpfile.write_all(contents.as_bytes())?; tmpfile.seek(SeekFrom::Start(0))?; }