Fakultas Ilmu Komputer UI

Skip to content
Snippets Groups Projects
Commit 09e59325 authored by dzak27567's avatar dzak27567
Browse files

Implement list_all_as_string function in Notification repository

parent 02c744ce
No related branches found
No related tags found
No related merge requests found
......@@ -16,5 +16,10 @@ impl NotificationRepository {
NOTIFICATIONS.write().unwrap()
.push(notification.clone());
return notification;
}
}
pub fn list_all_as_string() -> Vec<String> {
return NOTIFICATIONS.read().unwrap()
.iter().map(|f| format!("{}", f.clone())).collect();
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment