Skip to content

Commit

Permalink
remove some redundant print methods
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Feb 3, 2015
1 parent 3420529 commit c11c985
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion base/ascii.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ reverse(s::ASCIIString) = ASCIIString(reverse(s.data))

## outputing ASCII strings ##

print(io::IO, s::ASCIIString) = (write(io, s);nothing)
write(io::IO, s::ASCIIString) = write(io, s.data)

## transcoding to ASCII ##
Expand Down
2 changes: 1 addition & 1 deletion base/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ show(io::IO, s::Symbol) = show_unquoted(io, QuoteNode(s))

typealias ExprNode Union(Expr, QuoteNode, SymbolNode, LineNumberNode,
LabelNode, GotoNode, TopNode)
print (io::IO, ex::ExprNode) = show_unquoted(io, ex)
print (io::IO, ex::ExprNode) = (show_unquoted(io, ex); nothing)
show (io::IO, ex::ExprNode) = show_unquoted(io, QuoteNode(ex))
show_unquoted(io::IO, ex) = show_unquoted(io, ex, 0, 0)
show_unquoted(io::IO, ex, indent::Int) = show_unquoted(io, ex, indent, 0)
Expand Down
2 changes: 0 additions & 2 deletions base/string.jl
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,6 @@ SubString(s::AbstractString, i::Integer) = SubString(s, i, endof(s))

write{T<:ByteString}(to::IOBuffer, s::SubString{T}) =
s.endof==0 ? 0 : write_sub(to, s.string.data, s.offset+1, next(s,s.endof)[2]-1)
print(io::IOBuffer, s::SubString) = write(io, s)

sizeof(s::SubString{ASCIIString}) = s.endof
sizeof(s::SubString{UTF8String}) = s.endof == 0 ? 0 : next(s,s.endof)[2]-1
Expand Down Expand Up @@ -799,7 +798,6 @@ end

endof(s::RopeString) = s.endof
length(s::RopeString) = length(s.head) + length(s.tail)
print(io::IO, s::RopeString) = print(io, s.head, s.tail)
write(io::IO, s::RopeString) = (write(io, s.head); write(io, s.tail))
sizeof(s::RopeString) = sizeof(s.head) + sizeof(s.tail)

Expand Down
1 change: 0 additions & 1 deletion base/utf8.jl
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ end

## outputing UTF-8 strings ##

print(io::IO, s::UTF8String) = (write(io, s.data); nothing)
write(io::IO, s::UTF8String) = write(io, s.data)

## transcoding to UTF-8 ##
Expand Down

0 comments on commit c11c985

Please sign in to comment.