load_shed: make constructor for Overloaded error public (#661)

This allows for mocking. This also matches what is done for
the timeout Elapsed error.

Signed-off-by: Matt Klein <mklein@lyft.com>
This commit is contained in:
Matt Klein
2022-06-13 12:25:11 -06:00
committed by Eliza Weisman
parent 9ef51553f8
commit 42dded33e5
+3 -1
View File
@@ -7,12 +7,14 @@ use std::fmt;
/// called.
///
/// [`LoadShed`]: crate::load_shed::LoadShed
#[derive(Default)]
pub struct Overloaded {
_p: (),
}
impl Overloaded {
pub(crate) fn new() -> Self {
/// Construct a new overloaded error
pub fn new() -> Self {
Overloaded { _p: () }
}
}