rename Bytes::as_string()
to to_string()
, as_vector()
to to_vector()
#334
Labels
release
Part of the next release
Describe the release item
The
as_
prefix supposes that the returned value still references to the original owner. E.g.KeyExpr::as_string_view
is completely correct as the string view is just a refernence to value which contained in KeyExpt. On the other hand theto_
prefix supposes transferring the ownership. E.g.Config::to_string()
creates newstd::string
object.So normally the
as_string
andas_vector
should beto_string
andto_vector
.The proposal is:
to_string
andto_vector
toBytes
as_string
andas_vector
as the API is already stabilized, but mark them as deprecated and remove them from the documentationThe text was updated successfully, but these errors were encountered: