Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating new config with_section(None) seems broken #67

Closed
clunion opened this issue Jun 14, 2020 · 2 comments
Closed

Creating new config with_section(None) seems broken #67

clunion opened this issue Jun 14, 2020 · 2 comments

Comments

@clunion
Copy link

clunion commented Jun 14, 2020

the example code below
Usage
Create a Ini configuration file.
results in the following error:
error[E0283]: type annotations needed
96 | conf.with_section(None)
| ^^^^^^^^^^^^ cannot infer type for type parameter S declared on the associated function with_section
|
= note: cannot satisfy _: std::convert::Into<std::string::String>

Please excuse if the fault is on my side,
i am a bit new to Rust, thus i have no idea yet how to suggest a fix.

@zonyitoo
Copy link
Owner

conf.with_section(None::<String>);

May be I can add a default type for generic parameter S.

@zonyitoo
Copy link
Owner

zonyitoo commented Jun 16, 2020

Added a new function

conf.with_general_section()

Already released in v0.15.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants