forked from rojo-rbx/rojo
Remove unnecessary borrows (#810)
This commit is contained in:
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(),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user