()
| 170 | } |
| 171 | |
| 172 | pub(crate) async fn load_auth_token() -> Option<String> { |
| 173 | if let Some(auth_file) = |
| 174 | dirs::config_local_dir().map(|dir| dir.join("autokuma").join("auth.txt")) |
| 175 | { |
| 176 | return fs::read_to_string(auth_file).await.ok(); |
| 177 | } |
| 178 | |
| 179 | None |
| 180 | } |
| 181 | |
| 182 | pub(crate) trait CollectOrUnwrap: Iterator { |
| 183 | fn collect_or_unwrap(self) -> OneOrMany<Self::Item> |