Skip to content

Commit

Permalink
[stdlib] Don't make math.lcm take owned arguments
Browse files Browse the repository at this point in the history
There's no need for `math.lcm` to take ownership of its arguments.
Remove the `owned` keyword so the default argument convention of
`borrowed` is used for the function arguments. This will also simplify
#3041.

MODULAR_ORIG_COMMIT_REV_ID: 782c1016c7fe287fc21115504e75098431fe80dd
  • Loading branch information
JoeLoser authored and modularbot committed Jul 17, 2024
1 parent b594415 commit 4227346
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/src/math/math.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -1997,7 +1997,7 @@ fn gcd(*values: Int) -> Int:
# ===----------------------------------------------------------------------=== #


fn lcm(owned m: Int, owned n: Int, /) -> Int:
fn lcm(m: Int, n: Int, /) -> Int:
"""Computes the least common multiple of two integers.
Args:
Expand Down

0 comments on commit 4227346

Please sign in to comment.