From d786f5d5573a0d3483f3faa04ecf729f4265cf5d Mon Sep 17 00:00:00 2001 From: Jun Wu Date: Fri, 4 Oct 2019 20:33:58 -0700 Subject: [PATCH] indexedlog: make create_in_memory take a ref Summary: This makes OpenOptions reusable. It helps writing shorter tests. Reviewed By: xavierd Differential Revision: D17742000 fbshipit-source-id: aa6dd5cd1936ba73d5644ed90cce8f75c71585f7 --- lib/indexedlog/src/log.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/indexedlog/src/log.rs b/lib/indexedlog/src/log.rs index 6b410ca637..96c4838b60 100644 --- a/lib/indexedlog/src/log.rs +++ b/lib/indexedlog/src/log.rs @@ -1653,7 +1653,7 @@ impl OpenOptions { /// Construct an empty in-memory [`Log`] without side-effects on the /// filesystem. The in-memory [`Log`] cannot be [`sync`]ed. - pub fn create_in_memory(self) -> crate::Result { + pub fn create_in_memory(&self) -> crate::Result { let result: crate::Result<_> = (|| { let meta = LogMetadata { primary_len: PRIMARY_START_OFFSET,