mirror of
https://github.com/tower-rs/tower.git
synced 2025-09-28 05:20:57 +00:00
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:
parent
8b522920f8
commit
3c170aaf19
@ -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: () }
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user