Refactor different APIs into separate modules #24
Labels
No labels
bug
contribution welcome
duplicate
enhancement
good first issue
help wanted
invalid
question
upstream
needs/docs
needs/research
needs/upstream
type/bug
type/external
type/feature
type/refactor
urgency
high
urgency
immediate
urgency
low
urgency
medium
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ScottyLabs/bus-sign#24
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Objective
backend/src/lib.rscontains the bulk of the bus sign backend's functionality, with all the different APIs in the same file. It would be best to refactor this file into multiple smaller ones so that it is more maintainable.Ideally,
lib.rsshould only contain docs, module declarations, re-exports (pub use), and shared top-level types.Suggested Approach
This is a backend task.
Perhaps extract the OpenWeather API into its own
weather.rsmodule, the PRT API into aprt.rsmodule, etc. Refactor at your own discretion!Chapter 7 of the Rust Book may be helpful here. Pay close attention to how the
mod,pub,use, andaskeywords are used in Rust projects.