Skip to content

Commit 7ca6faa

Browse files
authored
Fix returned value of map! (#1142)
* Fix returned value of map! * bump version
1 parent 3fcfa44 commit 7ca6faa

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "StaticArrays"
22
uuid = "90137ffa-7385-5640-81b9-e52037218182"
3-
version = "1.5.17"
3+
version = "1.5.18"
44

55
[deps]
66
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

src/mapreduce.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ end
130130
return quote
131131
@_inline_meta
132132
@inbounds $(Expr(:block, exprs...))
133+
return dest
133134
end
134135
end
135136

test/mapreduce.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ using Statistics: mean
2121
@test @inferred(map(+, normal_v1, mv2))::MVector{4,Int} == @MVector [6, 7, 8, 9]
2222
@test @inferred(map(+, mv1, normal_v2))::MVector{4,Int} == @MVector [6, 7, 8, 9]
2323

24-
map!(+, mv, v1, v2)
24+
@test map!(+, mv, v1, v2) === mv
2525
@test mv == @MVector [6, 7, 8, 9]
2626
mv2 = MVector{4, Int}(undef)
2727
map!(x->x^2, mv2, v1)

0 commit comments

Comments
 (0)