Skip to content

Commit 154b581

Browse files
committed
Small code simplification
1 parent 78cfeae commit 154b581

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/kv/source.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub trait Source {
4949
}
5050

5151
/// The default implementation of `Source::get`
52-
pub(crate) fn get_default<'v>(source: &'v (impl Source + ?Sized), key: Key) -> Option<Value<'v>> {
52+
fn get_default<'v>(source: &'v (impl Source + ?Sized), key: Key) -> Option<Value<'v>> {
5353
struct Get<'k, 'v> {
5454
key: Key<'k>,
5555
found: Option<Value<'v>>,
@@ -72,7 +72,7 @@ pub(crate) fn get_default<'v>(source: &'v (impl Source + ?Sized), key: Key) -> O
7272
}
7373

7474
/// The default implementation of `Source::count`.
75-
pub(crate) fn count_default(source: impl Source) -> usize {
75+
fn count_default(source: impl Source) -> usize {
7676
struct Count(usize);
7777

7878
impl<'kvs> Visitor<'kvs> for Count {
@@ -159,7 +159,7 @@ where
159159
S: Source,
160160
{
161161
fn visit<'kvs>(&'kvs self, visitor: &mut dyn Visitor<'kvs>) -> Result<(), Error> {
162-
if let Some(ref source) = *self {
162+
if let Some(source) = self {
163163
source.visit(visitor)?;
164164
}
165165

0 commit comments

Comments
 (0)