Check-in [e45c7e529b]
Logged in as anonymous
Overview
Comment:make get_id public and add some tests for it
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e45c7e529bf3c2f6475be2fa05d2b180d15abafb6bd2bc22ef370b3ddeda6a32
User & Date: arcade on 2026-07-31 15:21:04.739
Other Links: manifest | tags
Context
2026-07-31
15:42
consolidate and clarify check-in: b9af445709 user: arcade tags: trunk
15:21
make get_id public and add some tests for it check-in: e45c7e529b user: arcade tags: trunk
15:20
propagate error from async check-in: cc376760fc user: arcade tags: trunk
Changes
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
			tg,
			fields,
			address,
		})
	}

	/// Returns id for provided email address
	fn get_id (&self, name_str: &str) -> Result<&ChatPeerId> {
		// here we need to store String locally to borrow it after
		let mut link = name_str;
		let name: String;
		if let Some(caps) = self.address.captures(link) {
			name = caps["name"].to_string();
			link = &name;
		}







|







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
			tg,
			fields,
			address,
		})
	}

	/// Returns id for provided email address
	pub fn get_id (&self, name_str: &str) -> Result<&ChatPeerId> {
		// here we need to store String locally to borrow it after
		let mut link = name_str;
		let name: String;
		if let Some(caps) = self.address.captures(link) {
			name = caps["name"].to_string();
			link = &name;
		}
Added tests/mail.rs version [eefa2c7a93].