mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-21 21:25:16 +00:00
Fix clippy warnings
This commit is contained in:
@@ -39,12 +39,10 @@ impl<F: VfsFetcher> Service for ApiService<F> {
|
||||
(&Method::GET, path) if path.starts_with("/api/subscribe/") => {
|
||||
self.handle_api_subscribe(request)
|
||||
}
|
||||
(_method, path) => {
|
||||
return json(
|
||||
ErrorResponse::not_found(format!("Route not found: {}", path)),
|
||||
StatusCode::NOT_FOUND,
|
||||
)
|
||||
}
|
||||
(_method, path) => json(
|
||||
ErrorResponse::not_found(format!("Route not found: {}", path)),
|
||||
StatusCode::NOT_FOUND,
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ pub struct Instance<'a> {
|
||||
}
|
||||
|
||||
impl<'a> Instance<'a> {
|
||||
pub(crate) fn from_rojo_instance<'b>(source: InstanceWithMeta<'b>) -> Instance<'b> {
|
||||
pub(crate) fn from_rojo_instance(source: InstanceWithMeta<'_>) -> Instance<'_> {
|
||||
Instance {
|
||||
id: source.id(),
|
||||
parent: source.parent(),
|
||||
|
||||
@@ -336,7 +336,7 @@ impl<F: VfsFetcher> UiService<F> {
|
||||
|
||||
// Round off all of our sub-second precision to make timestamps
|
||||
// nicer.
|
||||
let just_nanos = Duration::from_nanos(elapsed.subsec_nanos() as u64);
|
||||
let just_nanos = Duration::from_nanos(u64::from(elapsed.subsec_nanos()));
|
||||
let elapsed = elapsed - just_nanos;
|
||||
|
||||
humantime::format_duration(elapsed).to_string()
|
||||
|
||||
Reference in New Issue
Block a user