about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-08-31 10:08:52 +0200
committerGitHub <noreply@github.com>2024-08-31 10:08:52 +0200
commit1f0292bb8f8d97bb87993d1742423da01bcbc8fa (patch)
tree9eb9762d6c0483008e63682603824af8f68ba71d /compiler/rustc_codegen_llvm/src/errors.rs
parent1fd0c71818dd63ba4c75b4be8d5962af35e143d2 (diff)
parent1eb4cb452b62f82037e192cfb201e8795ce342ff (diff)
downloadrust-1f0292bb8f8d97bb87993d1742423da01bcbc8fa.tar.gz
rust-1f0292bb8f8d97bb87993d1742423da01bcbc8fa.zip
Rollup merge of #126183 - Folyd:search-core, r=GuillaumeGomez,notriddle
Separate core search logic with search ui

Currenty, the `search.js` mixed with UI/DOM manipulation codes and search logic codes, I propose to extract the search logic to a class for following benefits:

- Clean code. Separation of DOM manipulation and search logic can lead better code maintainability and easy code testings.
- Easy share the search logic for third party to utilize the search function, such as [Rust Search Extension](https://rust.extension.sh), https://query.rs.

This PR added a new class called `DocSearch`, which mainly expose following methods:

```js
class DocSearch {
	// Dependency inject searchIndex, rootPath and searchState
	constructor(rawSearchIndex, rootPath, searchState) {
		// build search index...
	}

	static parseQuery(userQuery) {
	}

	async execQuery(parsedQuery, filterCrates, currentCrate) {
	}
}
```
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions