mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-07 23:27:51 +00:00
Remove .clone() in favor of borrowing
This commit is contained in:
parent
d43b49e7e4
commit
59ef30c76d
6 changed files with 16 additions and 21 deletions
|
@ -38,7 +38,7 @@ async fn main() -> std::io::Result<()> {
|
|||
}
|
||||
|
||||
// start http server
|
||||
println!("Running Libreddit v{} on {}!", env!("CARGO_PKG_VERSION"), address.clone());
|
||||
println!("Running Libreddit v{} on {}!", env!("CARGO_PKG_VERSION"), &address);
|
||||
|
||||
HttpServer::new(|| {
|
||||
App::new()
|
||||
|
@ -71,7 +71,7 @@ async fn main() -> std::io::Result<()> {
|
|||
.route("/r/{sub}/comments/{id}/{title}/", web::get().to(post::item))
|
||||
.route("/r/{sub}/comments/{id}/{title}/{comment_id}/", web::get().to(post::item))
|
||||
})
|
||||
.bind(address.clone())
|
||||
.bind(&address)
|
||||
.unwrap_or_else(|_| panic!("Cannot bind to the address: {}", address))
|
||||
.run()
|
||||
.await
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue