mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
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
This commit is contained in:
parent
dec9087a1c
commit
d786f5d557
@ -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<Log> {
|
||||
pub fn create_in_memory(&self) -> crate::Result<Log> {
|
||||
let result: crate::Result<_> = (|| {
|
||||
let meta = LogMetadata {
|
||||
primary_len: PRIMARY_START_OFFSET,
|
||||
|
Loading…
Reference in New Issue
Block a user