1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-12-06 22:40:58 +03:00

Switch to camino's Utf8Path* instead of std::path::Path*

This commit is contained in:
Quentin Gliech
2022-11-18 18:50:11 +01:00
parent c76a1dd2e7
commit a86798d2b3
21 changed files with 99 additions and 74 deletions

View File

@@ -17,8 +17,6 @@
#![warn(clippy::pedantic)]
#![allow(clippy::module_name_repetitions)]
use std::path::PathBuf;
use anyhow::Context;
use clap::Parser;
use mas_config::TelemetryConfig;
@@ -44,7 +42,7 @@ async fn main() -> anyhow::Result<()> {
async fn try_main() -> anyhow::Result<()> {
// Load environment variables from .env files
// We keep the path to log it afterwards
let dotenv_path: Result<Option<PathBuf>, _> = dotenv::dotenv()
let dotenv_path: Result<Option<_>, _> = dotenv::dotenv()
.map(Some)
// Display the error if it is something other than the .env file not existing
.or_else(|e| if e.not_found() { Ok(None) } else { Err(e) });