lfs_server: remove mutable borrow from ODS middleware

Summary: `RequestContext` doesn't need to be mutable anymore.

Reviewed By: krallin

Differential Revision: D23631630

fbshipit-source-id: 0080aa3d5c25bafd784251adc34e98f9d04908de
This commit is contained in:
Arun Kulshreshtha 2020-09-10 20:55:21 -07:00 committed by Facebook GitHub Bot
parent 7904099f13
commit a43444d481

View File

@ -28,7 +28,7 @@ define_stats! {
}
fn log_stats(state: &mut State, status: StatusCode) -> Option<()> {
let ctx = state.try_borrow_mut::<RequestContext>()?;
let ctx = state.try_borrow::<RequestContext>()?;
let method = ctx.method?;
let repo = ctx.repository.clone()?;
let repo_and_method = format!("{}.{}", &repo, method.to_string());