Skip to content

Commit ccf35d3

Browse files
alexcrichtonbar
authored and
bar
committed
Don't expose private for now
May want to do this in a more rustic fashion later on.
1 parent ae8ac07 commit ccf35d3

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

src/easy.rs

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1963,22 +1963,22 @@ impl<'a> Easy<'a> {
19631963
enable as c_long)
19641964
}
19651965

1966-
/// Stores a private pointer-sized piece of data.
1967-
///
1968-
/// This can be retrieved through the `private` function and otherwise
1969-
/// libcurl does not tamper with this value. This corresponds to
1970-
/// `CURLOPT_PRIVATE` and defaults to 0.
1971-
pub fn set_private(&mut self, private: usize) -> Result<(), Error> {
1972-
self.setopt_ptr(curl_sys::CURLOPT_PRIVATE, private as *const _)
1973-
}
1966+
// /// Stores a private pointer-sized piece of data.
1967+
// ///
1968+
// /// This can be retrieved through the `private` function and otherwise
1969+
// /// libcurl does not tamper with this value. This corresponds to
1970+
// /// `CURLOPT_PRIVATE` and defaults to 0.
1971+
// pub fn set_private(&mut self, private: usize) -> Result<(), Error> {
1972+
// self.setopt_ptr(curl_sys::CURLOPT_PRIVATE, private as *const _)
1973+
// }
19741974

1975-
/// Fetches this handle's private pointer-sized piece of data.
1976-
///
1977-
/// This corresponds to
1978-
/// `CURLINFO_PRIVATE` and defaults to 0.
1979-
pub fn private(&mut self) -> Result<usize, Error> {
1980-
self.getopt_ptr(curl_sys::CURLINFO_PRIVATE).map(|p| p as usize)
1981-
}
1975+
// /// Fetches this handle's private pointer-sized piece of data.
1976+
// ///
1977+
// /// This corresponds to
1978+
// /// `CURLINFO_PRIVATE` and defaults to 0.
1979+
// pub fn private(&mut self) -> Result<usize, Error> {
1980+
// self.getopt_ptr(curl_sys::CURLINFO_PRIVATE).map(|p| p as usize)
1981+
// }
19821982

19831983
// =========================================================================
19841984
// getters
@@ -2308,17 +2308,18 @@ impl<'a> Easy<'a> {
23082308
default_configure(self);
23092309
}
23102310

2311-
/// Re-initializes this handle to all the default values *and* resets the
2312-
/// lifetime associated with this handle.
2311+
/// Re-initializes all lifetime-related configuration of this handle and
2312+
/// returns a handle with a new associated lifetime.
23132313
///
23142314
/// The lifetime on this handle is currently used to prevent storing
23152315
/// configuration which references data that lives shorter than this handle
23162316
/// (e.g. preventing use-after-free). This can make it difficult, however,
23172317
/// to reuse an `Easy` handle as the lifetime of callbacks may be limited to
23182318
/// a smaller scope.
23192319
///
2320-
/// This will have the same effect as `reset`, plus the additional effect of
2321-
/// returning a handle with a new arbitrary lifetime.
2320+
/// This will have the same effect as `reset` for any configuration option
2321+
/// that is also bounded by this handle's lifetime, plus the additional
2322+
/// effect of returning a handle with a new arbitrary lifetime.
23222323
pub fn reset_lifetime<'b>(mut self) -> Easy<'b> {
23232324
self.reset();
23242325
let new = Easy { handle: self.handle, _marker: marker::PhantomData };

0 commit comments

Comments
 (0)