mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Remove unnecessary borrows (#810)
This commit is contained in:
parent
9f13bca6b8
commit
cd14ea7c62
3 changed files with 4 additions and 4 deletions
2
build.rs
2
build.rs
|
|
@ -46,7 +46,7 @@ fn main() -> Result<(), anyhow::Error> {
|
|||
|
||||
let our_version = Version::parse(env::var_os("CARGO_PKG_VERSION").unwrap().to_str().unwrap())?;
|
||||
let plugin_version =
|
||||
Version::parse(fs::read_to_string(&plugin_root.join("Version.txt"))?.trim())?;
|
||||
Version::parse(fs::read_to_string(plugin_root.join("Version.txt"))?.trim())?;
|
||||
|
||||
assert!(
|
||||
our_version.major == plugin_version.major,
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ impl<K: Hash + Eq, V: Eq> MultiMap<K, V> {
|
|||
K: Borrow<Q>,
|
||||
Q: Hash + Eq,
|
||||
{
|
||||
self.inner.get(k.borrow()).map(Vec::as_slice).unwrap_or(&[])
|
||||
self.inner.get(k).map(Vec::as_slice).unwrap_or(&[])
|
||||
}
|
||||
|
||||
pub fn insert(&mut self, k: K, v: V) {
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ impl ApiService {
|
|||
})
|
||||
.unwrap();
|
||||
|
||||
json_ok(&WriteResponse { session_id })
|
||||
json_ok(WriteResponse { session_id })
|
||||
}
|
||||
|
||||
async fn handle_api_read(&self, request: Request<Body>) -> Response<Body> {
|
||||
|
|
@ -271,7 +271,7 @@ impl ApiService {
|
|||
},
|
||||
};
|
||||
|
||||
json_ok(&OpenResponse {
|
||||
json_ok(OpenResponse {
|
||||
session_id: self.serve_session.session_id(),
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue