feat(postgres): Failover postgres example maybe working!? Added FailoverTopology implementations for required capabilities, documented a bit, some more tests, and quite a few utility functions
Some checks failed
Run Check Script / check (pull_request) Failing after 1m49s
Some checks failed
Run Check Script / check (pull_request) Failing after 1m49s
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
pub mod id;
|
||||
pub mod net;
|
||||
pub mod rfc1123;
|
||||
pub mod storage;
|
||||
pub mod switch;
|
||||
pub mod rfc1123;
|
||||
|
||||
@@ -43,7 +43,9 @@ impl TryFrom<&str> for Rfc1123Name {
|
||||
}
|
||||
|
||||
// Trim leading/trailing non-alphanumeric
|
||||
content = content.trim_matches(|c: char| !c.is_ascii_alphanumeric()).to_string();
|
||||
content = content
|
||||
.trim_matches(|c: char| !c.is_ascii_alphanumeric())
|
||||
.to_string();
|
||||
|
||||
if content.is_empty() {
|
||||
return Err(format!("Input '{}' resulted in empty string", s));
|
||||
@@ -55,7 +57,6 @@ impl TryFrom<&str> for Rfc1123Name {
|
||||
type Error = String;
|
||||
}
|
||||
|
||||
|
||||
/// Converts an `Rfc1123Name` into a `String`.
|
||||
///
|
||||
/// This allows using `Rfc1123Name` in contexts where a `String` is expected.
|
||||
@@ -99,7 +100,6 @@ impl std::fmt::Display for Rfc1123Name {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::Rfc1123Name;
|
||||
@@ -229,4 +229,3 @@ mod tests {
|
||||
assert_eq!(name.content, "a.b.c");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ impl StorageSize {
|
||||
Self {
|
||||
size_bytes: size * 1024 * 1024 * 1024 * 1024,
|
||||
display_value: Some(size),
|
||||
display_suffix: Some("TiB".to_string()),
|
||||
display_suffix: Some("Ti".to_string()),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user