mirror of
https://github.com/Noratrieb/cluelessh.git
synced 2026-01-15 08:55:06 +01:00
refactor
This commit is contained in:
parent
ae5db1642c
commit
0efd08dd5c
12 changed files with 268 additions and 155 deletions
|
|
@ -119,16 +119,16 @@ impl Writer {
|
|||
pub struct NameList<'a>(&'a str);
|
||||
|
||||
impl<'a> NameList<'a> {
|
||||
pub(crate) fn one(item: &'a str) -> Self {
|
||||
pub fn one(item: &'a str) -> Self {
|
||||
if item.contains(',') {
|
||||
//panic!("tried creating name list with comma in item: {item}");
|
||||
}
|
||||
Self(item)
|
||||
}
|
||||
pub(crate) fn none() -> NameList<'static> {
|
||||
pub fn none() -> NameList<'static> {
|
||||
NameList("")
|
||||
}
|
||||
pub(crate) fn iter(&self) -> std::str::Split<char> {
|
||||
pub fn iter(&self) -> std::str::Split<char> {
|
||||
self.0.split(',')
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue