Fix return type of missing_method (#6718)

This commit is contained in:
Laurenz 2025-08-07 18:52:12 +02:00 committed by GitHub
parent da6aedf7a4
commit df9a9caee0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,5 +1,6 @@
//! Handles special built-in methods on values.
use ecow::{EcoString, eco_format};
use typst_library::diag::{At, SourceResult};
use typst_library::foundations::{Args, Str, Type, Value};
use typst_syntax::Span;
@ -86,6 +87,6 @@ pub(crate) fn call_method_access<'a>(
/// The missing method error message.
#[cold]
fn missing_method(ty: Type, method: &str) -> String {
format!("type {ty} has no method `{method}`")
fn missing_method(ty: Type, method: &str) -> EcoString {
eco_format!("type {ty} has no method `{method}`")
}