Skip to content

Commit

Permalink
prefer borrowing over __shared where it would not cause compiler errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tayloraswift committed Jun 3, 2024
1 parent 01d4e1d commit c67c114
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Sources/MD5/MD5.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ extension MD5:CustomStringConvertible
extension MD5:LosslessStringConvertible
{
public
init?(_ description:__shared String)
init?(_ description:borrowing String)
{
if let buffer:InlineBuffer<Storage> = .init(description)
{
Expand All @@ -88,7 +88,7 @@ extension MD5:LosslessStringConvertible
}

public
init?(_ description:__shared Substring)
init?(_ description:borrowing Substring)
{
if let buffer:InlineBuffer<Storage> = .init(description)
{
Expand All @@ -103,7 +103,7 @@ extension MD5:LosslessStringConvertible
extension MD5:ExpressibleByIntegerLiteral
{
@inlinable public
init(integerLiteral:StaticBigInt)
init(integerLiteral:borrowing StaticBigInt)
{
self.init(buffer: .init(integerLiteral: integerLiteral))
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/SHA1/SHA1.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ extension SHA1:CustomStringConvertible
extension SHA1:LosslessStringConvertible
{
@inlinable public
init?(_ description:__shared String)
init?(_ description:borrowing String)
{
if let buffer:InlineBuffer<Storage> = .init(description)
{
Expand All @@ -71,7 +71,7 @@ extension SHA1:LosslessStringConvertible
}

@inlinable public
init?(_ description:__shared Substring)
init?(_ description:borrowing Substring)
{
if let buffer:InlineBuffer<Storage> = .init(description)
{
Expand Down

0 comments on commit c67c114

Please sign in to comment.