summary refs log tree commit diff
diff options
context:
space:
mode:
authorSophie Forrest <git@sophieforrest.com>2024-09-06 14:05:10 +1200
committerSophie Forrest <git@sophieforrest.com>2024-09-06 14:05:10 +1200
commit00f8270eaf318b12a42b517e1a514a2228a2d1bb (patch)
tree18390df983fe1a8bb1ec02641263e5192ed6a8ef
parentc4ce297ff951583c9ffe3a88aa22933577b329da (diff)
docs: document methods on Course
-rw-r--r--src/lib.rs11
1 files changed, 6 insertions, 5 deletions
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