Skip to content

Any way to use generic string arguments? #5

Open
@alexzaru

Description

@alexzaru

There are several functions within the codebase that accept multiple <S: Into<String>> arguments. Consider the set_credentials function as an example:

pub fn set_credentials<S: Into<String>>(&mut self, username: S, password: S) -> &mut Self {
    self.credentials = Some((username.into(), password.into()));
    self....
    ...
}

The current implementation enforces that each argument must be of the exact same type. This behavior may not align with the intended functionality. The preference would be to allow different types for the two arguments, as long as they both implement the Into<String> trait.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestquestionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions