-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from 4t145/refactor-config-and-init
Fix build error when crypto features disabled
- Loading branch information
Showing
8 changed files
with
52 additions
and
42 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
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 |
---|---|---|
@@ -1,33 +1,2 @@ | ||
use crate::{basic::result::TardisResult, TardisFuns}; | ||
|
||
use super::Mapper; | ||
pub struct Base64Encode; | ||
pub struct Base64Decode; | ||
|
||
impl Mapper<String> for Base64Encode { | ||
type Output = String; | ||
fn map(value: String) -> String { | ||
TardisFuns::crypto.base64.encode(value) | ||
} | ||
} | ||
|
||
impl<'a> Mapper<&'a str> for Base64Encode { | ||
type Output = String; | ||
fn map(value: &'a str) -> String { | ||
TardisFuns::crypto.base64.encode(value) | ||
} | ||
} | ||
|
||
impl Mapper<String> for Base64Decode { | ||
type Output = TardisResult<String>; | ||
fn map(value: String) -> TardisResult<String> { | ||
TardisFuns::crypto.base64.decode(value) | ||
} | ||
} | ||
|
||
impl<'a> Mapper<&'a str> for Base64Decode { | ||
type Output = TardisResult<String>; | ||
fn map(value: &'a str) -> TardisResult<String> { | ||
TardisFuns::crypto.base64.decode(value) | ||
} | ||
} |