mirror of
https://github.com/euzu/tuliprox.git
synced 2026-10-01 05:22:28 +02:00
Stream table new columns
This commit is contained in:
@@ -127,6 +127,16 @@ pub fn humanize_snake_case(s: &str) -> String {
|
||||
result
|
||||
}
|
||||
|
||||
pub trait StringExt {
|
||||
fn longest<'a>(a: &'a str, b: &'a str) -> &'a str;
|
||||
}
|
||||
|
||||
impl StringExt for String {
|
||||
fn longest<'a>(a: &'a str, b: &'a str) -> &'a str {
|
||||
if a.len() >= b.len() { a } else { b }
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use std::collections::HashSet;
|
||||
|
||||
Reference in New Issue
Block a user