From 5ad4696d005e421c9624d21d699d925b070e62c9 Mon Sep 17 00:00:00 2001 From: Takeru Ohta Date: Wed, 1 Nov 2023 14:55:03 +0900 Subject: [PATCH] Quote `maybe` atom --- src/ra_log.erl | 2 +- src/ra_log_segment.erl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ra_log.erl b/src/ra_log.erl index 421546de..3832a370 100644 --- a/src/ra_log.erl +++ b/src/ra_log.erl @@ -546,7 +546,7 @@ next_index(#?MODULE{last_index = LastIdx}) -> LastIdx + 1. -spec fetch(ra_index(), state()) -> - {maybe(log_entry()), state()}. + {'maybe'(log_entry()), state()}. fetch(Idx, State0) -> case fold(Idx, Idx, fun(E, Acc) -> [E | Acc] end, [], State0) of {[], State} -> diff --git a/src/ra_log_segment.erl b/src/ra_log_segment.erl index bb43277c..e76a668e 100644 --- a/src/ra_log_segment.erl +++ b/src/ra_log_segment.erl @@ -59,7 +59,7 @@ data_start :: pos_integer(), data_offset :: pos_integer(), data_write_offset :: pos_integer(), - index = undefined :: maybe(ra_segment_index()), + index = undefined :: 'maybe'(ra_segment_index()), range :: 'maybe'({ra_index(), ra_index()}), pending_data = [] :: iodata(), pending_index = [] :: iodata(), @@ -367,7 +367,7 @@ fold0(Cfg, Cache0, Idx, FinalIdx, Index, Fun, AccFun, Acc0) -> Cfg#cfg.filename}) end. --spec range(state()) -> maybe({ra_index(), ra_index()}). +-spec range(state()) -> 'maybe'({ra_index(), ra_index()}). range(#state{range = Range}) -> Range.