-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚨 fix scope of rust's feature flag
Signed-off-by: David Bernard <[email protected]>
- Loading branch information
Showing
6 changed files
with
61 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
use crate::errors::Result; | ||
use crate::{Message, Sender}; | ||
use serde::Deserialize; | ||
use serde::Serialize; | ||
use std::time::Duration; | ||
use tokio::time::sleep; | ||
|
||
use super::Source; | ||
|
||
#[derive(Debug, Deserialize, Serialize)] | ||
pub(crate) struct Config {} | ||
|
||
impl TryFrom<Config> for NoopSource { | ||
type Error = crate::errors::Error; | ||
|
||
fn try_from(_value: Config) -> Result<Self> { | ||
Ok(Self {}) | ||
} | ||
} | ||
|
||
pub(crate) struct NoopSource {} | ||
|
||
impl Source for NoopSource { | ||
async fn run(&self, _tx: Sender<Message>) -> Result<()> { | ||
loop { | ||
sleep(Duration::MAX).await; | ||
} | ||
} | ||
} |