Skip to content

Commit

Permalink
Fix returned value of map! (#1142)
Browse files Browse the repository at this point in the history
* Fix returned value of map!

* bump version
  • Loading branch information
mateuszbaran committed Mar 20, 2023
1 parent 3fcfa44 commit 7ca6faa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "StaticArrays"
uuid = "90137ffa-7385-5640-81b9-e52037218182"
version = "1.5.17"
version = "1.5.18"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
1 change: 1 addition & 0 deletions src/mapreduce.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ end
return quote
@_inline_meta
@inbounds $(Expr(:block, exprs...))
return dest
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/mapreduce.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ using Statistics: mean
@test @inferred(map(+, normal_v1, mv2))::MVector{4,Int} == @MVector [6, 7, 8, 9]
@test @inferred(map(+, mv1, normal_v2))::MVector{4,Int} == @MVector [6, 7, 8, 9]

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

2 comments on commit 7ca6faa

@mateuszbaran
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/79974

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.5.18 -m "<description of version>" 7ca6faab7fb8863c13f2e957d54424567980d97e
git push origin v1.5.18

Please sign in to comment.