Fakultas Ilmu Komputer UI

Skip to content
Snippets Groups Projects
Commit dd358d8d authored by Christian Raphael Heryanto's avatar Christian Raphael Heryanto
Browse files

Implement list_all_as_string function in Subscriber repository.

parent 77b18f31
Branches
No related tags found
No related merge requests found
...@@ -16,4 +16,13 @@ impl NotificationRepository { ...@@ -16,4 +16,13 @@ impl NotificationRepository {
NOTIFICATIONS.write().unwrap().push(notification.clone()); NOTIFICATIONS.write().unwrap().push(notification.clone());
return notification; return notification;
} }
pub fn list_all_as_string() -> Vec<String> {
return NOTIFICATIONS
.read()
.unwrap()
.iter()
.map(|f| format!("{}", f.clone()))
.collect();
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment