Update crates/cashu/src/nuts/nut18.rs

Co-authored-by: ok300 <106775972+ok300@users.noreply.github.com>
This commit is contained in:
thesimplekid
2025-03-13 14:46:15 +00:00
committed by GitHub
parent eb5899843a
commit be1e048f2c

View File

@@ -117,11 +117,7 @@ impl TransportBuilder {
/// Add a tag
pub fn add_tag(mut self, tag: Vec<String>) -> Self {
if let Some(ref mut tags) = self.tags {
tags.push(tag);
} else {
self.tags = Some(vec![tag]);
}
self.tags.get_or_insert_with(Vec::new).push(tag);
self
}