@@ -57,7 +57,7 @@ impl Envelope {
5757
5858/// Implements convenient methods for the `ReporterId` type.
5959impl ReporterId {
60- pub fn new ( ) -> Self {
60+ pub fn generate ( ) -> Self {
6161 let id = random :: < u64 > ( ) ;
6262 ReporterId ( id)
6363 }
@@ -160,7 +160,7 @@ impl ReporterOnTcp {
160160 /// It does not open the TCP connection yet. Stores the destination
161161 /// address and creates a unique reporter id.
162162 pub fn new ( destination : String ) -> Result < Self , anyhow:: Error > {
163- let reporter_id = ReporterId :: new ( ) ;
163+ let reporter_id = ReporterId :: generate ( ) ;
164164 let result = ReporterOnTcp {
165165 destination,
166166 reporter_id,
@@ -265,7 +265,7 @@ mod tests {
265265 std:: sync:: LazyLock :: new ( || {
266266 vec ! [
267267 Envelope {
268- rid: ReporterId :: new ( ) ,
268+ rid: ReporterId :: generate ( ) ,
269269 timestamp: timestamp( ) ,
270270 event: Event {
271271 pid: pid( ) ,
@@ -278,7 +278,7 @@ mod tests {
278278 } ,
279279 } ,
280280 Envelope {
281- rid: ReporterId :: new ( ) ,
281+ rid: ReporterId :: generate ( ) ,
282282 timestamp: timestamp( ) ,
283283 event: Event {
284284 pid: pid( ) ,
@@ -300,7 +300,7 @@ mod tests {
300300 } ,
301301 } ,
302302 Envelope {
303- rid: ReporterId :: new ( ) ,
303+ rid: ReporterId :: generate ( ) ,
304304 timestamp: timestamp( ) ,
305305 event: Event {
306306 pid: pid( ) ,
0 commit comments