Skip to content

Commit

Permalink
Improved glyph url handling: accept arbitrary suffixes after {end} ma…
Browse files Browse the repository at this point in the history
…plibre#1443 - Fixed rust formatting
  • Loading branch information
bzeiss committed Jul 28, 2024
1 parent bd5938b commit b5e83d3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions martin/src/srv/fonts.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::string::ToString;
use std::str::FromStr;
use std::string::ToString;

use actix_web::error::{ErrorBadRequest, ErrorNotFound};
use actix_web::web::{Data, Path};
Expand Down Expand Up @@ -41,9 +41,7 @@ impl FontRequest {
)]
#[allow(clippy::unused_async)]
async fn get_font(path: Path<FontRequest>, fonts: Data<FontSources>) -> ActixResult<HttpResponse> {
let (start, end) = path.parse().map_err(|e| {
ErrorBadRequest(e.to_string())
})?;
let (start, end) = path.parse().map_err(|e| ErrorBadRequest(e.to_string()))?;

let data = fonts
.get_font_range(&path.fontstack, start, end)
Expand Down

0 comments on commit b5e83d3

Please sign in to comment.