diff --git a/src/main.rs b/src/main.rs index 00fd0d2..2dd348a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,5 @@ #![feature(plugin)] -#![feature(core)] -#![feature(path)] -#![feature(net)] +#![feature(ip_addr)] #![plugin(deuterium_plugin)] #![plugin(docopt_macros)] @@ -13,7 +11,7 @@ extern crate postgres; extern crate rustless; extern crate typemap; extern crate time; -extern crate "rustc-serialize" as rustc_serialize; +extern crate rustc_serialize; extern crate iron; extern crate docopt; extern crate uuid; @@ -40,11 +38,12 @@ docopt!(Args derive Debug, " Example backend. Usage: - backend run + backend [--ip=] [--port=] run backend g migration backend db migrate [] backend db rollback [] backend --version + backend --help Options: -h --help Show this screen. @@ -126,10 +125,10 @@ fn main() { let name = deuterium_orm::migration::create_migration_file( &args.arg_migration_name[..], - path::PathBuf::new("src/db/migrations") + path::PathBuf::from("src/db/migrations") ); println!("Migration with name {} was generated.", name); } -} \ No newline at end of file +} diff --git a/src/models/tweet.rs b/src/models/tweet.rs index e0861ec..bbd3084 100644 --- a/src/models/tweet.rs +++ b/src/models/tweet.rs @@ -14,8 +14,8 @@ pub struct Tweet { impl Tweet { pub fn get_id(&self) -> &uuid::Uuid { &self.id } - pub fn get_author_name(&self) -> &str { self.author_name.as_slice() } - pub fn get_content(&self) -> &str { self.content.as_slice() } + pub fn get_author_name(&self) -> &str { &self.author_name } + pub fn get_content(&self) -> &str { &self.content } pub fn get_created_at(&self) -> &time::Timespec { &self.created_at } pub fn get_updated_at(&self) -> &time::Timespec { &self.updated_at } @@ -90,4 +90,4 @@ impl Tweet { &self.id, ]).unwrap(); } -} \ No newline at end of file +}