A bunch of work on finger
Build and test / check (push) Failing after 42s
Build and test / build (push) Failing after 1m38s
Build and test / test (push) Failing after 1m40s
Build and test / docs (push) Failing after 2m56s

This commit is contained in:
2026-02-08 22:03:29 +09:00
parent def4eec2d5
commit 6ca9e0ced1
9 changed files with 431 additions and 16 deletions
+22
View File
@@ -55,6 +55,10 @@ impl FingerResponse {
self.0
}
pub fn is_empty(&self) -> bool {
self.0.is_empty()
}
pub fn from_bytes(bytes: &[u8]) -> Self {
if bytes.is_empty() {
return Self(String::new());
@@ -107,6 +111,24 @@ impl FingerResponse {
}
}
impl Default for FingerResponse {
fn default() -> Self {
Self(String::new())
}
}
impl From<String> for FingerResponse {
fn from(s: String) -> Self {
Self::new(s)
}
}
impl From<&str> for FingerResponse {
fn from(s: &str) -> Self {
Self::new(s.to_string())
}
}
#[cfg(test)]
mod tests {
use super::*;