File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -240,7 +240,12 @@ pub trait Hash {
240240/// [`write_u8`]: #method.write_u8
241241#[ stable( feature = "rust1" , since = "1.0.0" ) ]
242242pub trait Hasher {
243- /// Completes a round of hashing, producing the output hash generated.
243+ /// Returns the hash value for the values written so far.
244+ ///
245+ /// Despite its name, the method does not reset the hasher’s internal
246+ /// state. Additional [`write`]s will continue from the current value.
247+ /// If you need to start a fresh hash value, you will have to create
248+ /// a new hasher.
244249 ///
245250 /// # Examples
246251 ///
@@ -253,6 +258,8 @@ pub trait Hasher {
253258 ///
254259 /// println!("Hash is {:x}!", hasher.finish());
255260 /// ```
261+ ///
262+ /// ['write']: #tymethod.write
256263 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
257264 fn finish ( & self ) -> u64 ;
258265
You can’t perform that action at this time.
0 commit comments