From 00f8270eaf318b12a42b517e1a514a2228a2d1bb Mon Sep 17 00:00:00 2001 From: Sophie Forrest Date: Fri, 6 Sep 2024 14:05:10 +1200 Subject: docs: document methods on Course --- src/lib.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 6fbf7dc..38af605 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -47,11 +47,11 @@ pub struct Course<'a> { } impl<'a> Course<'a> { - /// . + /// Parses the courde id. /// /// # Panics /// - /// Panics if . + /// Panics if string is sliced in the middle of a character. pub fn parse_courseid(&mut self, elem: ElementRef<'a>) { elem.children().for_each(|child| { child.children().for_each(|c| { @@ -77,7 +77,7 @@ impl<'a> Course<'a> { /// /// # Panics /// - /// Panics if . + /// Panics if parsing fails, or a slice is made in the middle of a character. pub fn parse_coursepoints(&mut self, elem: ElementRef<'a>) { // Parse course points, prerequisites, and exclusions. let details = elem @@ -143,11 +143,12 @@ impl<'a> Course<'a> { } } - /// . + /// Parses the course timetable. /// /// # Panics /// - /// Panics if . + /// Panics if CRN doesn't exist, trimester doesn't exist, slice is made in the middle of + /// a byte, CRN isn't parseable, or trimester isn't parseable. pub fn parse_timetable(&mut self, elem: ElementRef<'a>) { // Parse timetable / CRNs. let details = elem -- cgit 1.4.1