Skip to content

Commit 6cd1e8e

Browse files
Copilotavik-pal
andcommitted
style: use backslash continuation instead of string concatenation
Replace string concatenation operator (*) with backslash line continuation (\) in error messages for better Julia style. Co-authored-by: avik-pal <30564094+avik-pal@users.noreply.github.com>
1 parent dccaddc commit 6cd1e8e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

lib/MLDataDevices/src/internal.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,9 @@ function array_adapt(
327327
f::F, ::Type{aType}, ::Type{Missing}, x::AbstractArray{T}
328328
) where {F,aType,T}
329329
isbitstype(T) || error(
330-
"Cannot move array with element type `$(T)` to device. Element type must be an " *
331-
"`isbits` type (e.g., Number, Char, or custom immutable struct with only " *
332-
"`isbits` fields).",
330+
"Cannot move array with element type `$(T)` to device. Element type must be an \
331+
`isbits` type (e.g., Number, Char, or custom immutable struct with only \
332+
`isbits` fields)."
333333
)
334334
return f(x)
335335
end
@@ -338,18 +338,18 @@ function array_adapt(
338338
::F, ::Type{aType}, ::Type{Nothing}, x::AbstractArray{T}
339339
) where {F,aType,T}
340340
isbitstype(T) || error(
341-
"Cannot move array with element type `$(T)` to device. Element type must be an " *
342-
"`isbits` type (e.g., Number, Char, or custom immutable struct with only " *
343-
"`isbits` fields).",
341+
"Cannot move array with element type `$(T)` to device. Element type must be an \
342+
`isbits` type (e.g., Number, Char, or custom immutable struct with only \
343+
`isbits` fields)."
344344
)
345345
return aType(x)
346346
end
347347

348348
function array_adapt(::F, ::Type{aType}, ::Type{E}, x::AbstractArray{T}) where {F,aType,E,T}
349349
isbitstype(T) || error(
350-
"Cannot move array with element type `$(T)` to device. Element type must be an " *
351-
"`isbits` type (e.g., Number, Char, or custom immutable struct with only " *
352-
"`isbits` fields).",
350+
"Cannot move array with element type `$(T)` to device. Element type must be an \
351+
`isbits` type (e.g., Number, Char, or custom immutable struct with only \
352+
`isbits` fields)."
353353
)
354354
return aType(x)
355355
end

0 commit comments

Comments
 (0)