Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#![feature(plugin)]
#![feature(core)]
#![feature(path)]
#![feature(net)]
#![feature(ip_addr)]

#![plugin(deuterium_plugin)]
#![plugin(docopt_macros)]
Expand All @@ -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;
Expand All @@ -40,11 +38,12 @@ docopt!(Args derive Debug, "
Example backend.

Usage:
backend run
backend [--ip=<ip>] [--port=<port>] run
backend g migration <migration-name>
backend db migrate [<version>]
backend db rollback [<steps>]
backend --version
backend --help

Options:
-h --help Show this screen.
Expand Down Expand Up @@ -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);

}
}
}
6 changes: 3 additions & 3 deletions src/models/tweet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand Down Expand Up @@ -90,4 +90,4 @@ impl Tweet {
&self.id,
]).unwrap();
}
}
}