blob: 5c45b928812ba7b35d1ce687415b11631816901e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
/// Represents a single suggested value.
#[derive(Debug)]
pub struct Suggestion {
value: String,
}
impl Suggestion {
pub fn new(value: String) -> Self {
Self { value }
}
pub fn get_value(&self) -> String {
self.value.clone()
}
}
impl std::fmt::Display for Suggestion {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.get_value())
}
}
|