Skip to content

Commit

Permalink
Rename parse to from_serializable
Browse files Browse the repository at this point in the history
Parse implies conversion from a string which is not what we are doing here.
  • Loading branch information
mdegans committed Oct 13, 2024
1 parent 22eb812 commit 9b7cf5d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,9 @@ impl<'a> Tool<'a> {
// A blanket impl for TryFrom<T> where T: Serialize would be nice but it
// would conflict with the blanket impl for TryFrom<Value> where Value:
// Serialize. This is a bit of a hack but it works.
pub fn parse<T>(value: T) -> std::result::Result<Self, serde_json::Error>
pub fn from_serializable<T>(
value: T,
) -> std::result::Result<Self, serde_json::Error>
where
T: Serialize,
{
Expand Down

0 comments on commit 9b7cf5d

Please sign in to comment.