diff options
author | Christian Poveda <christian.poveda@ferrous-systems.com> | 2022-10-03 13:57:04 -0500 |
---|---|---|
committer | Christian Poveda <christian.poveda@ferrous-systems.com> | 2022-10-07 14:10:24 -0500 |
commit | 46cd3af9c6969f1a433fe3792668844162f36ddf (patch) | |
tree | 3fd4f8ec312e78514a8beef611e4d001a9990183 /bindgen/clang.rs | |
parent | c8d569930e006a7e0975dfbaaf5e5d591749b30a (diff) |
Implement `Clone` for `Builder`
This is done by moving all the remaining `Builder` state into
`BindgenOptions` so any internal logic that affects `Builder` state only
runs once the builder is consumed by `Builder::generate`:
- move `input_headers` to `BindgenOptions`.
- move `input_header_contents` to `BindgenOptions`.
- derive `Clone` for `Builder`.
Diffstat (limited to 'bindgen/clang.rs')
-rw-r--r-- | bindgen/clang.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bindgen/clang.rs b/bindgen/clang.rs index ea505c87..e5113391 100644 --- a/bindgen/clang.rs +++ b/bindgen/clang.rs @@ -1823,7 +1823,7 @@ pub struct UnsavedFile { impl UnsavedFile { /// Construct a new unsaved file with the given `name` and `contents`. - pub fn new(name: &str, contents: &str) -> UnsavedFile { + pub fn new(name: String, contents: String) -> UnsavedFile { let name = CString::new(name).unwrap(); let contents = CString::new(contents).unwrap(); let x = CXUnsavedFile { |