Skip to content

Some restructuring of the code

loveb requested to merge loveb/eduprox:master into master

Well there's a couple of changes, some for the eye and some for the memory.

Generic arguments

I've changed the signature of post to be generic so that we don't have to convert &'static str to String and thus improving speed and efficiency.

Switch String to Box in ScheduleData

Well String is best for modifying a buffer etc, and Box simply allocates a str to the heap. Logan Smith made a good video on it

Break out everything calling isahc::HttpClient to a wrapper struct which implement the functions that we used earlier.

Well the title explains it pretty much. Instead of having a bunch of functions that take isahc::HttpClient they are all pinned on a wrapper struct which only have a isahc::HttpClient it makes it clear which parts deal with what imo.

Merge request reports