Skip to content

Commit e7a931b

Browse files
[autofix.ci] apply automated fixes
1 parent 9eaa9c3 commit e7a931b

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

internal/compiler/passes/resolving.rs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -359,17 +359,16 @@ impl Expression {
359359
}
360360

361361
fn from_at_image_url_node(node: syntax_nodes::AtImageUrl, ctx: &mut LookupCtx) -> Self {
362-
let s = match node
363-
.child_text(SyntaxKind::StringLiteral)
364-
.and_then(|x|
365-
if x.starts_with("\"data:") {
366-
// Remove quotes here because unescape_string() doesn't support \n yet.
367-
let x = x.strip_prefix('"')?;
368-
let x = x.strip_suffix('"')?;
369-
Some(SmolStr::new(x))
370-
} else { crate::literals::unescape_string(&x) }
371-
)
372-
{
362+
let s = match node.child_text(SyntaxKind::StringLiteral).and_then(|x| {
363+
if x.starts_with("\"data:") {
364+
// Remove quotes here because unescape_string() doesn't support \n yet.
365+
let x = x.strip_prefix('"')?;
366+
let x = x.strip_suffix('"')?;
367+
Some(SmolStr::new(x))
368+
} else {
369+
crate::literals::unescape_string(&x)
370+
}
371+
}) {
373372
Some(s) => s,
374373
None => {
375374
ctx.diag.push_error("Cannot parse string literal".into(), &node);

internal/core/graphics/image.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,10 @@ pub(crate) mod ffi {
12841284

12851285
#[cfg(feature = "image-decoders")]
12861286
#[no_mangle]
1287-
pub unsafe extern "C" fn slint_image_load_from_data_url(data_url: &SharedString, image: *mut Image) {
1287+
pub unsafe extern "C" fn slint_image_load_from_data_url(
1288+
data_url: &SharedString,
1289+
image: *mut Image,
1290+
) {
12881291
core::ptr::write(
12891292
image,
12901293
Image::load_from_data_url(data_url.as_str()).unwrap_or(Image::default()),

0 commit comments

Comments
 (0)