Load tokens from file
()
| 53 | |
| 54 | /// Load tokens from file |
| 55 | pub fn load() -> Option<Self> { |
| 56 | let path = Self::auth_path()?; |
| 57 | let contents = fs::read_to_string(&path).ok()?; |
| 58 | serde_json::from_str(&contents).ok() |
| 59 | } |
| 60 | |
| 61 | /// Save tokens to file |
| 62 | pub fn save(&self) -> io::Result<()> { |
no outgoing calls
no test coverage detected